import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';


const routes = [
    // 项目打开后进入的默认地址
    {
        path: '/',
        hidden:false,
        keepAlive:false,
        redirect: '/home'
    },{
        path: '/login',
        keepAlive:true,
        hidden:false,
        component: () => import('../views/login/login.vue')
    },{
        path: "/home",
        name: "首 页",
        keepAlive:false,
        hidden:true,
        children: null,
        component: () => import('../views/home/home.vue'),
    },{
        path: "/table",
        hidden:true,
        name: "表格列表",
        keepAlive:false,
        children: [
            {
                path: "/table/table",
                name: "基础表格",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/table/table.vue'),
            },
            {
                path: "/table/virtualTable",
                name: "虚拟表格",
                keepAlive:false,
                hidden:true,
                children: null,
                component: () => import('../views/table/virtualTable.vue'),
            },
        ],
    },{
        path: "/echarts",
        hidden:true,
        name: "Echarts",
        keepAlive:false,
        children: [
            {
                path: "/echarts/histogram",
                name: "柱状图",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/echarts/histogram.vue'),
            },{
                path: "/echarts/line",
                name: "折线图",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/echarts/line.vue'),
            },{
                path: "/echarts/echartsMap",
                name: "EchartsMap",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/echarts/echartsMap.vue'),
            },
        ],
    },{
        path: "/threejs",
        hidden:true,
        name: "threejs",
        keepAlive:false,
        children: [
            {
                path: "/threejs/basicGraphics",
                name: "基础图形",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/threejs/basicGraphics.vue'),
            },{
                path: "/threejs/map",
                name: "地图",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/threejs/map.vue'),
            },
        ],
    },{
        path: "/trends",
        hidden:true,
        name: "动态效果",
        keepAlive:false,
        children: [
            {
                path: "/trends/trends",
                name: "css动态效果",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/trends/trends.vue'),
            },
        ],
    },{
        path: "/maps",
        hidden:true,
        name: "地图合集",
        keepAlive:false,
        children: [
            {
                path: "/maps/gMaps",
                name: "高德地图",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/maps/gMaps.vue'),
            },
        ],
    },{
        path: "/chooseSeat",
        hidden:true,
        name: "电影选座",
        keepAlive:false,
        children: [
            {
                path: "/chooseSeat/index",
                name: "电影选座",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/chooseSeat/index.vue'),
            },
        ],
    },{
        path: "/canvas",
        hidden:true,
        name: "canvas",
        keepAlive:false,
        children: [
            {
                path: "/canvas/index",
                name: "canvas基础",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/canvas/index/index.vue'),
            },
        ],
    },
    {
        path: "/konva",
        hidden:true,
        name: "konva",
        keepAlive:false,
        children: [
            {
                path: "/konva/index",
                name: "konva使用",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/konva/index/index.vue'),
            },{
                path: "/konva/draw",
                name: "绘图",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/konva/draw/index.vue'),
            },{
                path: "/konva/flowChart",
                name: "流程图",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/konva/flowChart/flowChart.vue'),
            },{
                path: "/konva/drop",
                name: "drop使用",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/konva/draw/drop.vue'),
            },{
                path: "/konva/greedySnake",
                name: "贪吃蛇",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/konva/greedySnake/index.vue'),
            },
        ],
    },{
        path: "/export",
        hidden:true,
        name: "公共导出",
        keepAlive:false,
        children: [
            {
                path: "/export/excel/index",
                name: "excel导入导出",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/export/excel/index.vue'),
            },
            {
                path: "/export/word/index",
                name: "word导出",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/export/word/index.vue'),
            },{
                path: "/export/pdf/index",
                name: "pdf导出",
                hidden:true,
                keepAlive:false,
                children: null,
                component: () => import('../views/export/pdf/index.vue'),
            },
        ],
    },

];





const asyncRoutes = createRouter({
    history: createWebHashHistory(), // 本项目采用了哈希模式
    routes
});

export default asyncRoutes
